package com.brilliance.project.dao.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.brilliance.project.dao.ISampleDao;
import com.brilliance.project.dao.entity.Sample;
import com.brilliance.project.webapp.form.sample.SampleForm;

@Component("sampleDaoImpl")
public class SampleDaoImpl extends BaseDaoImpl implements ISampleDao {
	public List<SampleForm> query(SampleForm sampleForm) {
		return this.getSqlSession().selectList(
				"com.brilliance.project.dao.entity.sampleMapper.query",
				sampleForm);
	}

	public Sample getSample(String id) {
		this.getSqlSession().selectList(
				"com.brilliance.project.dao.entity.sampleMapper.query");
		System.out.println("dao");
		return null;
	}

	public boolean addSample(List<Sample> list) throws Exception {
		for (Sample sample : list) {
			this.getSqlSession().insert(
					"com.brilliance.project.dao.entity.sampleMapper.add",
					sample);
		}
		return true;
	}

}
